//
//  HuisuoJidiCell.m
//  Shengzhuli
//
//  Created by FXGuo on 2018/3/15.
//  Copyright © 2018年 kamangkeji. All rights reserved.
//

#import "HuisuoJidiCell.h"
#import <UIImageView+WebCache.h>

@interface HuisuoJidiCell()
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UILabel *addressLab;
@property (weak, nonatomic) IBOutlet UILabel *countLab;



@end

@implementation HuisuoJidiCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(NewMapModel *)model
{
    _model = model;
    [self.imgView sd_setImageWithURL:[NSURL URLWithString:model.clubLogo] placeholderImage:GetImage(@"default_goods_image")];
    self.nameLab.text = model.clubName;
    self.addressLab.text = [NSString stringWithFormat:@"位置:%@",model.address];
    
    NSInteger count = [NSString stringWithFormat:@"访客人数:"].length;
    NSString *str = [NSString stringWithFormat:@"访客人数:%@",model.applyCount];
    NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc]initWithString:str];
    [attrStr addAttributes:@{NSFontAttributeName:Font(11),NSForegroundColorAttributeName:[UIColor colorWithHexString:@"#888888"]} range:NSMakeRange(0, count)];
    [attrStr addAttributes:@{NSFontAttributeName:Font(11),NSForegroundColorAttributeName:[UIColor colorWithHexString:@"#3285ff"]} range:NSMakeRange(count, str.length-count)];
    self.countLab.attributedText = attrStr;
}

@end
